package com.itaming.lycheeframework.security.exception;

import com.itaming.lycheeframework.api.result.IErrorCode;
import com.itaming.lycheeframework.security.result.SecurityErrorCode;
import lombok.Getter;

import java.io.Serial;

/**
 * 认证异常
 *
 * @author A.Ming
 */
@Getter
public class AuthenticationException extends SecurityException {

    @Serial
    private static final long serialVersionUID = 1L;

    private static final IErrorCode DEFAULT_RESULT_CODE = SecurityErrorCode.UNAUTHORIZED;

    public AuthenticationException() {
        super(DEFAULT_RESULT_CODE);
    }

    public AuthenticationException(IErrorCode errorCode) {
        super(errorCode);
    }

    public AuthenticationException(String message) {
        super(DEFAULT_RESULT_CODE, message);
    }

}
